home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
menus
/
envmnu11.zip
/
CDMENU.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-11-16
|
775b
|
36 lines
@echo off
REM EXAMPLE THAT WORKS FOR DOS 5 (I think) TO CHANGE DIRECTORIES
:Again
if exist DirList.Tmp del DirList.Tmp
if a%CMDLINE%z==az GOTO BEYOND_4DOS_DOTS
echo .. >> DirList.Tmp
echo . >> DirList.Tmp
:BEYOND_4DOS_DOTS
dir /Ad /b >> DirList.Tmp
REM 4-DOS method for getting dots
:GOT_DOTS
echo C: >> DirList.Tmp
echo D: >> DirList.Tmp
echo E: >> DirList.Tmp
set DIR_CHOICE=
envimenu DIR_CHOICE DirList.Tmp /Prompt "Choose a directory, or Esc to quit:" /Esc
if ERRORLEVEL 1 GOTO FINISHED
del DirList.Tmp > NUL
if %DIR_CHOICE%==C: GOTO CDRIVE
if %DIR_CHOICE%==D: GOTO CDRIVE
if %DIR_CHOICE%==E: GOTO CDRIVE
cd %DIR_CHOICE%
GOTO Again
:CDRIVE
%DIR_CHOICE%
GOTO Again
:FINISHED
if exist DirList.Tmp del DirList.Tmp
set DIR_CHOICE=
cls